3.3.62 \(\int \frac {\cos ^2(c+d x)}{(e+f x)^2 (a+a \sin (c+d x))} \, dx\) [262]

Optimal. Leaf size=95 \[ -\frac {1}{a f (e+f x)}-\frac {d \cos \left (c-\frac {d e}{f}\right ) \text {Ci}\left (\frac {d e}{f}+d x\right )}{a f^2}+\frac {\sin (c+d x)}{a f (e+f x)}+\frac {d \sin \left (c-\frac {d e}{f}\right ) \text {Si}\left (\frac {d e}{f}+d x\right )}{a f^2} \]

[Out]

-1/a/f/(f*x+e)-d*Ci(d*e/f+d*x)*cos(c-d*e/f)/a/f^2+d*Si(d*e/f+d*x)*sin(c-d*e/f)/a/f^2+sin(d*x+c)/a/f/(f*x+e)

________________________________________________________________________________________

Rubi [A]
time = 0.13, antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {4619, 32, 3378, 3384, 3380, 3383} \begin {gather*} -\frac {d \cos \left (c-\frac {d e}{f}\right ) \text {CosIntegral}\left (\frac {d e}{f}+d x\right )}{a f^2}+\frac {d \sin \left (c-\frac {d e}{f}\right ) \text {Si}\left (\frac {d e}{f}+d x\right )}{a f^2}+\frac {\sin (c+d x)}{a f (e+f x)}-\frac {1}{a f (e+f x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^2/((e + f*x)^2*(a + a*Sin[c + d*x])),x]

[Out]

-(1/(a*f*(e + f*x))) - (d*Cos[c - (d*e)/f]*CosIntegral[(d*e)/f + d*x])/(a*f^2) + Sin[c + d*x]/(a*f*(e + f*x))
+ (d*Sin[c - (d*e)/f]*SinIntegral[(d*e)/f + d*x])/(a*f^2)

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rule 3378

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(c + d*x)^(m + 1)*(Sin[e + f*x]/(d*(m
 + 1))), x] - Dist[f/(d*(m + 1)), Int[(c + d*x)^(m + 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && LtQ[
m, -1]

Rule 3380

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3383

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rule 3384

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[c*(f/d) + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[c*(f/d) + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 4619

Int[(Cos[(c_.) + (d_.)*(x_)]^(n_)*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_.)*Sin[(c_.) + (d_.)*(x_)]), x_Symbol
] :> Dist[1/a, Int[(e + f*x)^m*Cos[c + d*x]^(n - 2), x], x] - Dist[1/b, Int[(e + f*x)^m*Cos[c + d*x]^(n - 2)*S
in[c + d*x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 1] && EqQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \frac {\cos ^2(c+d x)}{(e+f x)^2 (a+a \sin (c+d x))} \, dx &=\frac {\int \frac {1}{(e+f x)^2} \, dx}{a}-\frac {\int \frac {\sin (c+d x)}{(e+f x)^2} \, dx}{a}\\ &=-\frac {1}{a f (e+f x)}+\frac {\sin (c+d x)}{a f (e+f x)}-\frac {d \int \frac {\cos (c+d x)}{e+f x} \, dx}{a f}\\ &=-\frac {1}{a f (e+f x)}+\frac {\sin (c+d x)}{a f (e+f x)}-\frac {\left (d \cos \left (c-\frac {d e}{f}\right )\right ) \int \frac {\cos \left (\frac {d e}{f}+d x\right )}{e+f x} \, dx}{a f}+\frac {\left (d \sin \left (c-\frac {d e}{f}\right )\right ) \int \frac {\sin \left (\frac {d e}{f}+d x\right )}{e+f x} \, dx}{a f}\\ &=-\frac {1}{a f (e+f x)}-\frac {d \cos \left (c-\frac {d e}{f}\right ) \text {Ci}\left (\frac {d e}{f}+d x\right )}{a f^2}+\frac {\sin (c+d x)}{a f (e+f x)}+\frac {d \sin \left (c-\frac {d e}{f}\right ) \text {Si}\left (\frac {d e}{f}+d x\right )}{a f^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.23, size = 80, normalized size = 0.84 \begin {gather*} \frac {-d (e+f x) \cos \left (c-\frac {d e}{f}\right ) \text {Ci}\left (d \left (\frac {e}{f}+x\right )\right )+f (-1+\sin (c+d x))+d (e+f x) \sin \left (c-\frac {d e}{f}\right ) \text {Si}\left (d \left (\frac {e}{f}+x\right )\right )}{a f^2 (e+f x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^2/((e + f*x)^2*(a + a*Sin[c + d*x])),x]

[Out]

(-(d*(e + f*x)*Cos[c - (d*e)/f]*CosIntegral[d*(e/f + x)]) + f*(-1 + Sin[c + d*x]) + d*(e + f*x)*Sin[c - (d*e)/
f]*SinIntegral[d*(e/f + x)])/(a*f^2*(e + f*x))

________________________________________________________________________________________

Maple [A]
time = 0.20, size = 137, normalized size = 1.44

method result size
derivativedivides \(\frac {d \left (\frac {\sin \left (d x +c \right )}{\left (-c f +d e +f \left (d x +c \right )\right ) f}-\frac {-\frac {\sinIntegral \left (-d x -c -\frac {-c f +d e}{f}\right ) \sin \left (\frac {-c f +d e}{f}\right )}{f}+\frac {\cosineIntegral \left (d x +c +\frac {-c f +d e}{f}\right ) \cos \left (\frac {-c f +d e}{f}\right )}{f}}{f}-\frac {1}{\left (-c f +d e +f \left (d x +c \right )\right ) f}\right )}{a}\) \(137\)
default \(\frac {d \left (\frac {\sin \left (d x +c \right )}{\left (-c f +d e +f \left (d x +c \right )\right ) f}-\frac {-\frac {\sinIntegral \left (-d x -c -\frac {-c f +d e}{f}\right ) \sin \left (\frac {-c f +d e}{f}\right )}{f}+\frac {\cosineIntegral \left (d x +c +\frac {-c f +d e}{f}\right ) \cos \left (\frac {-c f +d e}{f}\right )}{f}}{f}-\frac {1}{\left (-c f +d e +f \left (d x +c \right )\right ) f}\right )}{a}\) \(137\)
risch \(-\frac {1}{a f \left (f x +e \right )}+\frac {d \,{\mathrm e}^{\frac {i \left (c f -d e \right )}{f}} \expIntegral \left (1, -i d x -i c -\frac {-i c f +i d e}{f}\right )}{2 a \,f^{2}}+\frac {d \,{\mathrm e}^{-\frac {i \left (c f -d e \right )}{f}} \expIntegral \left (1, i d x +i c -\frac {i \left (c f -d e \right )}{f}\right )}{2 a \,f^{2}}+\frac {\left (-2 d x f -2 d e \right ) \sin \left (d x +c \right )}{2 f a \left (f x +e \right ) \left (-d x f -d e \right )}\) \(162\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^2/(f*x+e)^2/(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

d/a*(sin(d*x+c)/(-c*f+d*e+f*(d*x+c))/f-(-Si(-d*x-c-(-c*f+d*e)/f)*sin((-c*f+d*e)/f)/f+Ci(d*x+c+(-c*f+d*e)/f)*co
s((-c*f+d*e)/f)/f)/f-1/(-c*f+d*e+f*(d*x+c))/f)

________________________________________________________________________________________

Maxima [C] Result contains complex when optimal does not.
time = 0.36, size = 172, normalized size = 1.81 \begin {gather*} \frac {d^{2} {\left (i \, E_{2}\left (\frac {i \, d e + i \, {\left (d x + c\right )} f - i \, c f}{f}\right ) - i \, E_{2}\left (-\frac {i \, d e + i \, {\left (d x + c\right )} f - i \, c f}{f}\right )\right )} \cos \left (-\frac {d e - c f}{f}\right ) + d^{2} {\left (E_{2}\left (\frac {i \, d e + i \, {\left (d x + c\right )} f - i \, c f}{f}\right ) + E_{2}\left (-\frac {i \, d e + i \, {\left (d x + c\right )} f - i \, c f}{f}\right )\right )} \sin \left (-\frac {d e - c f}{f}\right ) - 2 \, d^{2}}{2 \, {\left (a d e f + {\left (d x + c\right )} a f^{2} - a c f^{2}\right )} d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2/(f*x+e)^2/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

1/2*(d^2*(I*exp_integral_e(2, (I*d*e + I*(d*x + c)*f - I*c*f)/f) - I*exp_integral_e(2, -(I*d*e + I*(d*x + c)*f
 - I*c*f)/f))*cos(-(d*e - c*f)/f) + d^2*(exp_integral_e(2, (I*d*e + I*(d*x + c)*f - I*c*f)/f) + exp_integral_e
(2, -(I*d*e + I*(d*x + c)*f - I*c*f)/f))*sin(-(d*e - c*f)/f) - 2*d^2)/((a*d*e*f + (d*x + c)*a*f^2 - a*c*f^2)*d
)

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 137, normalized size = 1.44 \begin {gather*} -\frac {2 \, {\left (d f x + d e\right )} \sin \left (-\frac {c f - d e}{f}\right ) \operatorname {Si}\left (\frac {d f x + d e}{f}\right ) + {\left ({\left (d f x + d e\right )} \operatorname {Ci}\left (\frac {d f x + d e}{f}\right ) + {\left (d f x + d e\right )} \operatorname {Ci}\left (-\frac {d f x + d e}{f}\right )\right )} \cos \left (-\frac {c f - d e}{f}\right ) - 2 \, f \sin \left (d x + c\right ) + 2 \, f}{2 \, {\left (a f^{3} x + a f^{2} e\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2/(f*x+e)^2/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

-1/2*(2*(d*f*x + d*e)*sin(-(c*f - d*e)/f)*sin_integral((d*f*x + d*e)/f) + ((d*f*x + d*e)*cos_integral((d*f*x +
 d*e)/f) + (d*f*x + d*e)*cos_integral(-(d*f*x + d*e)/f))*cos(-(c*f - d*e)/f) - 2*f*sin(d*x + c) + 2*f)/(a*f^3*
x + a*f^2*e)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\cos ^{2}{\left (c + d x \right )}}{e^{2} \sin {\left (c + d x \right )} + e^{2} + 2 e f x \sin {\left (c + d x \right )} + 2 e f x + f^{2} x^{2} \sin {\left (c + d x \right )} + f^{2} x^{2}}\, dx}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**2/(f*x+e)**2/(a+a*sin(d*x+c)),x)

[Out]

Integral(cos(c + d*x)**2/(e**2*sin(c + d*x) + e**2 + 2*e*f*x*sin(c + d*x) + 2*e*f*x + f**2*x**2*sin(c + d*x) +
 f**2*x**2), x)/a

________________________________________________________________________________________

Giac [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 6.33, size = 3408, normalized size = 35.87 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2/(f*x+e)^2/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

-1/2*(d*f*x*real_part(cos_integral(d*x + d*e/f))*tan(1/2*d*x)^2*tan(1/2*c)^2*tan(1/2*d*e/f)^2 + d*f*x*real_par
t(cos_integral(-d*x - d*e/f))*tan(1/2*d*x)^2*tan(1/2*c)^2*tan(1/2*d*e/f)^2 - 2*d*f*x*imag_part(cos_integral(d*
x + d*e/f))*tan(1/2*d*x)^2*tan(1/2*c)^2*tan(1/2*d*e/f) + 2*d*f*x*imag_part(cos_integral(-d*x - d*e/f))*tan(1/2
*d*x)^2*tan(1/2*c)^2*tan(1/2*d*e/f) - 4*d*f*x*sin_integral((d*f*x + d*e)/f)*tan(1/2*d*x)^2*tan(1/2*c)^2*tan(1/
2*d*e/f) + 2*d*f*x*imag_part(cos_integral(d*x + d*e/f))*tan(1/2*d*x)^2*tan(1/2*c)*tan(1/2*d*e/f)^2 - 2*d*f*x*i
mag_part(cos_integral(-d*x - d*e/f))*tan(1/2*d*x)^2*tan(1/2*c)*tan(1/2*d*e/f)^2 + 4*d*f*x*sin_integral((d*f*x
+ d*e)/f)*tan(1/2*d*x)^2*tan(1/2*c)*tan(1/2*d*e/f)^2 + d*e*real_part(cos_integral(d*x + d*e/f))*tan(1/2*d*x)^2
*tan(1/2*c)^2*tan(1/2*d*e/f)^2 + d*e*real_part(cos_integral(-d*x - d*e/f))*tan(1/2*d*x)^2*tan(1/2*c)^2*tan(1/2
*d*e/f)^2 - d*f*x*real_part(cos_integral(d*x + d*e/f))*tan(1/2*d*x)^2*tan(1/2*c)^2 - d*f*x*real_part(cos_integ
ral(-d*x - d*e/f))*tan(1/2*d*x)^2*tan(1/2*c)^2 + 4*d*f*x*real_part(cos_integral(d*x + d*e/f))*tan(1/2*d*x)^2*t
an(1/2*c)*tan(1/2*d*e/f) + 4*d*f*x*real_part(cos_integral(-d*x - d*e/f))*tan(1/2*d*x)^2*tan(1/2*c)*tan(1/2*d*e
/f) - 2*d*e*imag_part(cos_integral(d*x + d*e/f))*tan(1/2*d*x)^2*tan(1/2*c)^2*tan(1/2*d*e/f) + 2*d*e*imag_part(
cos_integral(-d*x - d*e/f))*tan(1/2*d*x)^2*tan(1/2*c)^2*tan(1/2*d*e/f) - 4*d*e*sin_integral((d*f*x + d*e)/f)*t
an(1/2*d*x)^2*tan(1/2*c)^2*tan(1/2*d*e/f) - d*f*x*real_part(cos_integral(d*x + d*e/f))*tan(1/2*d*x)^2*tan(1/2*
d*e/f)^2 - d*f*x*real_part(cos_integral(-d*x - d*e/f))*tan(1/2*d*x)^2*tan(1/2*d*e/f)^2 + 2*d*e*imag_part(cos_i
ntegral(d*x + d*e/f))*tan(1/2*d*x)^2*tan(1/2*c)*tan(1/2*d*e/f)^2 - 2*d*e*imag_part(cos_integral(-d*x - d*e/f))
*tan(1/2*d*x)^2*tan(1/2*c)*tan(1/2*d*e/f)^2 + 4*d*e*sin_integral((d*f*x + d*e)/f)*tan(1/2*d*x)^2*tan(1/2*c)*ta
n(1/2*d*e/f)^2 + d*f*x*real_part(cos_integral(d*x + d*e/f))*tan(1/2*c)^2*tan(1/2*d*e/f)^2 + d*f*x*real_part(co
s_integral(-d*x - d*e/f))*tan(1/2*c)^2*tan(1/2*d*e/f)^2 - 2*d*f*x*imag_part(cos_integral(d*x + d*e/f))*tan(1/2
*d*x)^2*tan(1/2*c) + 2*d*f*x*imag_part(cos_integral(-d*x - d*e/f))*tan(1/2*d*x)^2*tan(1/2*c) - 4*d*f*x*sin_int
egral((d*f*x + d*e)/f)*tan(1/2*d*x)^2*tan(1/2*c) - d*e*real_part(cos_integral(d*x + d*e/f))*tan(1/2*d*x)^2*tan
(1/2*c)^2 - d*e*real_part(cos_integral(-d*x - d*e/f))*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*d*f*x*imag_part(cos_inte
gral(d*x + d*e/f))*tan(1/2*d*x)^2*tan(1/2*d*e/f) - 2*d*f*x*imag_part(cos_integral(-d*x - d*e/f))*tan(1/2*d*x)^
2*tan(1/2*d*e/f) + 4*d*f*x*sin_integral((d*f*x + d*e)/f)*tan(1/2*d*x)^2*tan(1/2*d*e/f) + 4*d*e*real_part(cos_i
ntegral(d*x + d*e/f))*tan(1/2*d*x)^2*tan(1/2*c)*tan(1/2*d*e/f) + 4*d*e*real_part(cos_integral(-d*x - d*e/f))*t
an(1/2*d*x)^2*tan(1/2*c)*tan(1/2*d*e/f) - 2*d*f*x*imag_part(cos_integral(d*x + d*e/f))*tan(1/2*c)^2*tan(1/2*d*
e/f) + 2*d*f*x*imag_part(cos_integral(-d*x - d*e/f))*tan(1/2*c)^2*tan(1/2*d*e/f) - 4*d*f*x*sin_integral((d*f*x
 + d*e)/f)*tan(1/2*c)^2*tan(1/2*d*e/f) - d*e*real_part(cos_integral(d*x + d*e/f))*tan(1/2*d*x)^2*tan(1/2*d*e/f
)^2 - d*e*real_part(cos_integral(-d*x - d*e/f))*tan(1/2*d*x)^2*tan(1/2*d*e/f)^2 + 2*d*f*x*imag_part(cos_integr
al(d*x + d*e/f))*tan(1/2*c)*tan(1/2*d*e/f)^2 - 2*d*f*x*imag_part(cos_integral(-d*x - d*e/f))*tan(1/2*c)*tan(1/
2*d*e/f)^2 + 4*d*f*x*sin_integral((d*f*x + d*e)/f)*tan(1/2*c)*tan(1/2*d*e/f)^2 + d*e*real_part(cos_integral(d*
x + d*e/f))*tan(1/2*c)^2*tan(1/2*d*e/f)^2 + d*e*real_part(cos_integral(-d*x - d*e/f))*tan(1/2*c)^2*tan(1/2*d*e
/f)^2 + 2*f*tan(1/2*d*x)^2*tan(1/2*c)^2*tan(1/2*d*e/f)^2 + d*f*x*real_part(cos_integral(d*x + d*e/f))*tan(1/2*
d*x)^2 + d*f*x*real_part(cos_integral(-d*x - d*e/f))*tan(1/2*d*x)^2 - 2*d*e*imag_part(cos_integral(d*x + d*e/f
))*tan(1/2*d*x)^2*tan(1/2*c) + 2*d*e*imag_part(cos_integral(-d*x - d*e/f))*tan(1/2*d*x)^2*tan(1/2*c) - 4*d*e*s
in_integral((d*f*x + d*e)/f)*tan(1/2*d*x)^2*tan(1/2*c) - d*f*x*real_part(cos_integral(d*x + d*e/f))*tan(1/2*c)
^2 - d*f*x*real_part(cos_integral(-d*x - d*e/f))*tan(1/2*c)^2 + 2*d*e*imag_part(cos_integral(d*x + d*e/f))*tan
(1/2*d*x)^2*tan(1/2*d*e/f) - 2*d*e*imag_part(cos_integral(-d*x - d*e/f))*tan(1/2*d*x)^2*tan(1/2*d*e/f) + 4*d*e
*sin_integral((d*f*x + d*e)/f)*tan(1/2*d*x)^2*tan(1/2*d*e/f) + 4*d*f*x*real_part(cos_integral(d*x + d*e/f))*ta
n(1/2*c)*tan(1/2*d*e/f) + 4*d*f*x*real_part(cos_integral(-d*x - d*e/f))*tan(1/2*c)*tan(1/2*d*e/f) - 2*d*e*imag
_part(cos_integral(d*x + d*e/f))*tan(1/2*c)^2*tan(1/2*d*e/f) + 2*d*e*imag_part(cos_integral(-d*x - d*e/f))*tan
(1/2*c)^2*tan(1/2*d*e/f) - 4*d*e*sin_integral((d*f*x + d*e)/f)*tan(1/2*c)^2*tan(1/2*d*e/f) - d*f*x*real_part(c
os_integral(d*x + d*e/f))*tan(1/2*d*e/f)^2 - d*f*x*real_part(cos_integral(-d*x - d*e/f))*tan(1/2*d*e/f)^2 + 2*
d*e*imag_part(cos_integral(d*x + d*e/f))*tan(1/2*c)*tan(1/2*d*e/f)^2 - 2*d*e*imag_part(cos_integral(-d*x - d*e
/f))*tan(1/2*c)*tan(1/2*d*e/f)^2 + 4*d*e*sin_integral((d*f*x + d*e)/f)*tan(1/2*c)*tan(1/2*d*e/f)^2 + 4*f*tan(1
/2*d*x)^2*tan(1/2*c)*tan(1/2*d*e/f)^2 + 4*f*tan...

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\cos \left (c+d\,x\right )}^2}{{\left (e+f\,x\right )}^2\,\left (a+a\,\sin \left (c+d\,x\right )\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^2/((e + f*x)^2*(a + a*sin(c + d*x))),x)

[Out]

int(cos(c + d*x)^2/((e + f*x)^2*(a + a*sin(c + d*x))), x)

________________________________________________________________________________________